//
//  YCWithDrawTableViewCell.m
//  YCVillageDoctor
//
//  Created by zhangji on 2017/6/30.
//  Copyright © 2017年 zhangxiaoliang. All rights reserved.
//

#import "YCWithDrawTableViewCell.h"

@implementation YCWithDrawTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setUpUI];
        
    }
    
    return self;
}

- (void)setUpUI {

    
    UIImageView * imageView = [[UIImageView alloc] init];
    [self.contentView addSubview:imageView];
    
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.equalTo(self.mas_leading).offset(12);
        make.centerY.mas_equalTo(self.mas_centerY);
        make.size.mas_equalTo(CGSizeMake(20, 15));
    }];
    self.imgView = imageView;
    
    UILabel * nameLabel = [[UILabel alloc] init];
    nameLabel.text = @"Yaphets";
    [self.contentView addSubview:nameLabel];
    
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.equalTo(imageView.mas_trailing).offset(15);
        make.centerY.mas_equalTo(self.mas_centerY);
        make.size.mas_equalTo(CGSizeMake(130, 30));
    }];
    
    self.nameLabel = nameLabel;
    
    UILabel * descLabel = [UILabel new];
    descLabel.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:descLabel];
    
    [descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.trailing.equalTo(self.mas_trailing).offset(-12);
        make.centerY.mas_equalTo(self.mas_centerY);
        make.size.mas_equalTo(CGSizeMake(100, 30));
    }];
    
    self.moneyLabel = descLabel;
    

}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
